package com.admin.service;

import com.admin.domain.*;
import com.admin.req.score.ScoreReq;
import com.admin.vo.ResultVO;
import com.admin.vo.declareDetail.retrunback.ReturnScoreModuleVO;
import com.admin.vo.declareDetail.score.ScoreListVO;
import com.admin.vo.declareDetail.score.SubModuleVO;

import java.util.List;

/**
 * 评分service
 *
 * @author yangzhongliang
 * @date 2022/05/16
 */
public interface DeclareScoreService {


    /**
     * 单个模块的评分列表
     * @param moduleName
     * @param scoreListVOList
     * @return
     */
    List<ReturnScoreModuleVO> scoreModule(String moduleName, List<ScoreListVO> scoreListVOList);

    /**
     * 子模块的分数规则 - 评分信息
     * @param declareId
     * @param moduleName
     * @param scoreParams
     * @return
     */
    SubModuleVO subScoreModule(Integer declareId, String moduleName, List<ScoreParam> scoreParams);


    /**
     * 保存评分信息
     * @param userId
     * @param scoreReq
     * @return
     */
    ResultVO save(Integer userId, ScoreReq scoreReq, String userLevel);

    /**
     * 保存 评分 - 主表，明细表
     * @param declare
     * @param declareScore
     * @param scoreModuleList
     */
    void transactionSave(Declare declare, DeclareScore declareScore, List<DeclareScoreModule> scoreModuleList);

    /**
     * 更新
     * @param declare
     * @param declareScore
     * @param scoreModuleList
     */
    void transactionUpdate(Declare declare, DeclareScore declareScore, List<DeclareScoreModule> scoreModuleList);


    /**
     * 评分信息列表
     * @param declareId
     * @return
     */
    List<ScoreListVO> findByDeclareId(Integer declareId);


    /**
     * 市级 - 批量赋分
     * @param adminDO
     * @param declare
     */
    void cityBatchScore(AdminDO adminDO, Declare declare);

    /**
     * 省级- 批量赋分
     * @param adminDO
     * @param declare
     */
    void provinceBatchScore(AdminDO adminDO, Declare declare);



}
